﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 收货单明细
    /// </summary>
    [SqlSugar.SugarTable(TableName = "TReceivingBillDetails")]
    public partial class TReceivingBillDetail
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        /// <summary>
        /// 关联单Id
        /// </summary>
        public int BillId { get; set; }
        /// <summary>
        /// 关联单号
        /// </summary>
        public string BillNo { get; set; }
        /// <summary>
        /// 行号
        /// </summary>
        
        public string BillLineNo { get; set; }
        /// <summary>
        /// 物料Id
        /// </summary>
        public int? MaterialId { get; set; }
        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }
        /// <summary>
        /// 物料描述
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料条码（69码）
        /// </summary>
        public string Articlebarcode { get; set; }

        /// <summary>
        /// 物料类型编码
        /// </summary>
        public string MaterialTypeCode { get; set; }
        /// <summary>
        /// 物料类型名称
        /// </summary>
        public string MaterialTypeName { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public decimal Qty { get; set; }
        /// <summary>
        /// 收货数量
        /// </summary>
        public decimal ReceivedQty { get; set; }
        /// <summary>
        /// 状态：0-未收货；1-已收货；
        /// </summary>
        public int Status { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }
        /// <summary>
        /// 确定时间
        /// </summary>
        public DateTime? ConfirmDate { get; set; }
        /// <summary>
        /// 采购单号
        /// </summary>
        public string PurchaseOrderNo { get; set; }
        /// <summary>
        /// 生产日期
        /// </summary>
        public DateTime? ProductDate { get; set; }
        /// <summary>
        /// 供应商Id
        /// </summary>
        public int? SupplierId { get; set; }
        /// <summary>
        /// 供应商
        /// </summary>
        public string SupplierName { get; set; }
        /// <summary>
        /// 货主Id
        /// </summary>
        public int? OwnerId { get; set; }
        /// <summary>
        /// 货主
        /// </summary>
        public string OwnerName { get; set; }
        /// <summary>
        /// 批次号
        /// </summary>
        public string BatchNo { get; set; }
        /// <summary>
        /// CheckedQTY
        /// </summary>
        public decimal? CheckedQty { get; set; }
        /// <summary>
        /// 需质检数量
        /// </summary>
        public decimal? NeedCheckQty { get; set; }
        /// <summary>
        /// 是否需质检
        /// </summary>
        public bool? IsNeedQc { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal? Price { get; set; }
        /// <summary>
        /// 总计
        /// </summary>
        public decimal? TotalPrice { get; set; }
        /// <summary>
        /// 批次号说明
        /// </summary>
        public string? BatchNoExplain { get; set; }
        /// <summary>
        /// 生产厂家
        /// </summary>
        public string? ProduceFactory { get; set; }
        /// <summary>
        /// 出场日期
        /// </summary>
        public DateTime? OutFactoryDate { get; set; }
        /// <summary>
        /// 有效日期
        /// </summary>
        public DateTime? ExpireDate { get; set; }

        #region 收货新增字段

        /// <summary>
        /// 收货单号
        /// </summary>
        public string OrderSn { get; set; }

        /// <summary>
        /// 公司编码
        /// </summary>
        public string PompanyCode { get; set; }

        /// <summary>
        /// 公司名称
        /// </summary>
        public string PompanyName { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        public int BillType { get; set; }

        /// <summary>
        /// 移动类型
        /// </summary>
        public int MoveType { get; set; }

        /// <summary>
        /// 源单号（采购订单号）
        /// </summary>
        public string PurOrderLineNo { get; set; }

        /// <summary>
        /// 凭证日期
        /// </summary>
        public DateTime DocumentDate { get; set; }

        /// <summary>
        /// 供应商编码
        /// </summary>
        public string SupplierCode { get; set; }

        /// <summary>
        /// 行项目
        /// </summary>
        public int IineItem {  get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string TMaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string TMaterialName { get; set;}

        /// <summary>
        /// 规格型号
        /// </summary>
        public string ModelSpec { get; set; }

        /// <summary>
        /// 预计到货日期
        /// </summary>
        public DateTime ExpectedTime { get; set; }

        /// <summary>
        /// 采购单位名称
        /// </summary>
        public string CustomerName { get; set; }

        /// <summary>
        /// 采购单位编码
        /// </summary>
        public string CustomerCode { get; set; }

        /// <summary>
        /// 工厂编码
        /// </summary>
        public string FactoryCode { get; set; }

        /// <summary>
        /// 工厂名称
        /// </summary>
        public string FactoryName { get; set; }

        /// <summary>
        /// 流程类型  1:采购收货单接口  2:生产订单接口  3:生产退料单接口  4:销售订单退货接口
        /// </summary>
        public int FlowPathType { get; set; }



        /// <summary>
        /// 计划开始日期
        /// </summary>
        public DateTime PlanStartTime { get; set; }

        /// <summary>
        /// 计划完工日期
        /// </summary>
        public DateTime PlanEndTime { get; set; }

        /// <summary>
        /// 单位名称
        /// </summary>
        public string UnitName { get; set; }

        /// <summary>
        /// 单位编码
        /// </summary>
        public string UnitCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 产品编码
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// 销售订单号
        /// </summary>
        public string SafeOrderSn { set; get; }

        /// <summary>
        /// 销售订单行项目
        /// </summary>
        public int SaleIineItem { get; set; }

        /// <summary>
        /// 退货时间
        /// </summary>
        public DateTime ReturnDateTime { get; set; }
        #endregion
    }
}
